package com.dlc.shop.live.common.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @author lhd
 * @date 2020-08-06 16:29:53
 */
@Data
@TableName("tz_live_room")
public class LiveRoom {

    @TableId
    @Schema(description = "直播间id")
    private Long roomId;

    @Schema(description = "店铺id")
    private Long shopId;

    @Schema(description = "直播间名称")
    private String name;

    @Schema(description = "主播昵称")
    @TableField(exist = false)
    private String nickName;

    @Schema(description = "主播手机号")
    @TableField(exist = false)
    private String userMobile;

    @Schema(description = "主播状态 1 正常 0 无效")
    @TableField(exist = false)
    private Integer status;

    @Schema(description = "主播用户id")
    private String userId;

    @Schema(description = "直播间状态 0.未开始 1.直播中 2.已结束 3.暂停中 -1.违规下架")
    private Integer liveStatus;

    @Schema(description = "直播背景图")
    private String coverImg;

    @Schema(description = "主播分享图")
    private String shareImg;

    @Schema(description = "直播封面图")
    private String feedsImg;

    @Schema(description = "是否置顶 0.否 1.是")
    private Integer roomTop;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "直播开始时间")
    private Date startTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "直播结束时间")
    private Date endTime;

    @Schema(description = "创建时间")
    private Date createTime;

    @Schema(description = "更新时间")
    private Date updateTime;

    @Schema(description = "下线备注")
    private String remark;

    @TableField(exist = false)
    @Schema(description = "商品id列表")
    private List<Long> prodIds;
}
